<%@page pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>尚学堂学员论坛--注册</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<Link rel="stylesheet" type="text/css" href="style/style.css"/>
<script language="javascript">
function check() {
	var uname = document.getElementById("uname").value;
	var upass = document.getElementById("upass").value;
	var upass1 = document.getElementById("upass1").value;
	var prov = document.getElementById("prov").value;
	var city = document.getElementById("city").value;
	if(uname == "") {
		alert("用户名不能为空");
		return false;
	}
	if(upass == "") {
		alert("密码不能为空");
		return false;
	}
	if(upass != upass1){
		alert("2次密码不一样");
		return false;
	}
}
</script>

<script type='text/javascript' src='/SxtBBS/dwr/interface/dwrservice.js'></script>
<script type='text/javascript' src='/SxtBBS/dwr/engine.js'></script>
<script type='text/javascript' src='/SxtBBS/dwr/util.js'></script>
<script type="text/javascript">
	function checkUname(uname) {
		dwrservice.checkUname(uname, function(isExit) {
			if(isExit) {
				DWRUtil.setValue("checkuname","用户名不能重复")
			} else {
				DWRUtil.setValue("checkuname","")
			}
		});
	}
	
	function getProv() {
		dwrservice.listProv(function backProv(json) {
			DWRUtil.addOptions("prov", json, "id","name");
		});
	}
	
	function getCity(provid) {
		dwrservice.listCity(provid,function backCity(json){
			DWRUtil.removeAllOptions("city");
			DWRUtil.addOptions("city",json,"id","name");
		});
	}
</script>
</HEAD>
<BODY onload="getProv()">
<DIV>
	<IMG src="image/logo.jpg" style="width:200px;height:50px">
	<div align="right">现在是：2012-2-26 09:23:45</div>
</DIV>
<!--      用户信息、登录、注册        -->

	<DIV class="h">
		您尚未　<a href="login.jsp">登录</a>
		&nbsp;| &nbsp; <A href="reg.jsp">注册</A> |
	</DIV>


<BR/>
<!--      导航        -->
<DIV>
	&gt;&gt;<B><a href="index.html">论坛首页</a></B>
</DIV>
<!--      用户注册表单        -->
<DIV  class="t" style="MARGIN-TOP: 15px" align="center">
	<FORM name="regForm" onSubmit="return check();" action="userservice" method="post">
		<input type="hidden" name="method" value="reg"/>
		<br/>用&nbsp;户&nbsp;名 &nbsp;
			<INPUT class="input" tabIndex="1" type="text" maxLength="20" size="35" name="uname" id="uname" onblur="checkUname(this.value)"><span id="checkuname" style="background-color: red"></span>
		<br/>密&nbsp;&nbsp;&nbsp;&nbsp;码 &nbsp;
			<INPUT class="input" tabIndex="2" type="password" maxLength="20" size="40" name="upass" id="upass" style="margin-top:2px">
		<br/>重复密码 &nbsp;
			<INPUT class="input" tabIndex="3" type="password" maxLength="20" size="40" name="upass1" id="upass1" style="margin-top:2px">
		<br/>所属区域 &nbsp;
		<select name="prov" id="prov" class="input" style="margin-top:2px" onchange="getCity(this.value)">
		<option value="this.value">--请选择省份--</option>
		</select>
		<select name="city" id="city" class="input">
		<option value="this.value">--请选择城市--</option>
		</select>
		<br/>性别 &nbsp;
			女<input type="radio" name="gender" value="1">
			男<input type="radio" name="gender" value="2" checked="checked" />
		
		<br/>请选择头像 <br/>
		 <div class="t" style="WIDTH:50%">
		<img src="image/head/1.gif"/><input type="radio" name="head" value="1.gif" checked="checked">
		<img src="image/head/2.gif"/><input type="radio" name="head" value="2.gif">
		<img src="image/head/3.gif"/><input type="radio" name="head" value="3.gif">
		<img src="image/head/4.gif"/><input type="radio" name="head" value="4.gif">
		<img src="image/head/5.gif"/><input type="radio" name="head" value="5.gif">
		<BR/>
		<img src="image/head/6.gif"/><input type="radio" name="head" value="6.gif">
		<img src="image/head/7.gif"/><input type="radio" name="head" value="7.gif">
		<img src="image/head/8.gif"/><input type="radio" name="head" value="8.gif">
		<img src="image/head/9.gif"/><input type="radio" name="head" value="9.gif">
		<img src="image/head/10.gif"/><input type="radio" name="head" value="10.gif">
		<BR/>
		<img src="image/head/11.gif"/><input type="radio" name="head" value="11.gif">
		<img src="image/head/12.gif"/><input type="radio" name="head" value="12.gif">
		<img src="image/head/13.gif"/><input type="radio" name="head" value="13.gif">
		<img src="image/head/14.gif"/><input type="radio" name="head" value="14.gif">
		<img src="image/head/15.gif"/><input type="radio" name="head" value="15.gif">
		<br/>
		 本地头像&nbsp;<input type="file" class="input" name="fileName" size="50" style="margin-top:2px;margin-bottom:4px">
		
		 </div>
		<INPUT class="btn" tabIndex="4" type="submit" value="注 册">
	</FORM>
</DIV>
<!--      声明        -->
<BR>
<CENTER class="gray">版权所有 2005-2011　北京尚学堂科技有限公司</CENTER>
</BODY>
</HTML>